/*
package com.aliwo.entity;

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

import java.net.DatagramPacket;
import java.util.*;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;

*/
/**
 * .
 *
 * @author xuyayuan
 * @date 2021/10/11 11:38
 *//*

public class AtomicDemo {

    public static Executor getAsyncExecutor() {
        int cupProcessors = Runtime.getRuntime().availableProcessors();
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        executor.setCorePoolSize(cupProcessors);
        executor.setMaxPoolSize(cupProcessors * 5);
        executor.setQueueCapacity(cupProcessors * 2);
        executor.setThreadNamePrefix("AsyncExecutor-framework-");
        executor.initialize();
        return executor;
    }

    public static void main(String[] args) {
        //Long i = 1L;
        //Long addi = new AtomicLong(i).incrementAndGet();
        //System.out.println("addi : " + addi);
        //Executor executor = AtomicDemo.getAsyncExecutor();
        //System.out.println("Executor：" + executor);

        Set<String> set1 = new HashSet<>();
        set1.add("a");
        set1.add("b");
        set1.add("c");
        set1.add("d");
        Set<String> set2 = new HashSet<>();
        set2.add("a");
        set2.add("d");

        Set<String> diffDeviceCodeSet =
                set1.stream().filter(item -> !set2.contains(item)).collect(Collectors.toSet());

        System.out.println("diffDeviceCodeSet: " + diffDeviceCodeSet);

        Long time = 1634549708670L;
        System.out.println("data:" + new Date(time));
    }
    */
/**
     * getMatchingSuppliers
     *
     * @param dictId         dictId
     * @param dictType       dictType
     * @param owner          owner
     * @param pageNumber     pageNumber
     * @param eachPageAmount  eachPageAmount
     * @return {@link DictWordList} object
     *//*

    @ApiOperation(
            tags = "02 字典",
            value = "[TG_V1_02_0001] 获取字典",
            notes = "按照字典Id或者供应商Id来获取字典。返回值的数量根据分页参数进行计算，但最多不超过100行",
            response = DictWordList.class,
            httpMethod = "GET"
    )
    @RequestMapping(value = "/getDictIndividualWord/{dictId}", method = RequestMethod.GET)
    public DictWordList getDictIndividualWord(
            @ApiParam(value = "字典Id", required = true)
            @PathVariable("dictId") String dictId,

            @ApiParam(value = "字典类型.<br/>0 - system(默认)<br/>1 - customer", required = false)
            @RequestParam(value = "dictType", required = false) Integer dictType,

            @ApiParam(value = "所有者.<br/>system(默认) OR 供应商Id", required = false)
            @RequestParam(value = "owner", required = false) String owner,

            @ApiParam(value = "当前分页页号。下标从1开始计算。<br/>默认值 = 1", required = false)
            @RequestParam(value = "pageNumber", required = false,defaultValue = "1") Integer pageNumber,

            @ApiParam(value = "每页返回单词数量。<br/>取值范围[1, 100]；超过范围，使用默认值<br/>默认值 = 100", required = false)
            @RequestParam(value = "eachPageAmount", required = false,defaultValue = "100") Integer eachPageAmount) {
        PageBean pageBean = new PageBean(pageNumber,eachPageAmount);
        System.out.println("pageBean.getEachPageAmount:"+pageBean.getEachPageAmount());
        System.out.println("pageBean.getStart:"+pageBean.getStart());
        DictWordList dictWordList = new DictWordList();
        System.out.println("pageNumber:"+pageNumber);
        eachPageAmount=pageNumber*eachPageAmount;
        System.out.println("eachPageAmount:"+eachPageAmount);
        System.out.println("========-------++++++");
        List<String> wordList = dictionaryMapper.selectByDictId(dictId,pageBean.getEachPageAmount(),pageBean.getStart());
        dictWordList.setSuccess(true);
        dictWordList.setDictId(dictId);
        dictWordList.setWorldList(wordList);
        return dictWordList;
    }

}
*/
